#include <scott/InputParameter.h>

BOOST_AUTO_TEST_SUITE( InputParameter_Test_Suite )

BOOST_AUTO_TEST_CASE( InputParameter_Create_Test )
{
	// Simple value parameter
	InputParameterSp p = InputParameter::Create("Str", "A string", STypeString);
	
	BOOST_CHECK( p->GetName() == "Str" );
	BOOST_CHECK( p->GetDescription() == "A string" );
	BOOST_CHECK( p->GetType() == STypeString );

	// Enum input parameter
	SEnumTypeDescriptorSp etd = SEnumTypeDescriptor::Create("plugin", "colors", "");
	etd->AddEntry("red", 0, "red color");			
	etd->AddEntry("yellow", 1, "yellow color");
	etd->AddEntry("green", 2, "green color");

	InputParameterSp p2 = InputParameter::Create("Enum", "A enum", etd);
	
	BOOST_CHECK( p2->GetName() == "Enum" );
	BOOST_CHECK( p2->GetDescription() == "A enum" );
	BOOST_CHECK( p2->GetType() == STypeEnum );
	BOOST_CHECK( p2->GetTypeDescriptor() == etd );
}

BOOST_AUTO_TEST_SUITE_END()
